import request from '@/utils/request'
export default {



    addSector(form) {
        return request({
             url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/addSector`,
           //url: `/hr/sector/addSector`,
            method: 'post',
            data: form,
            //roleQuery条件对象，后端使用requestbody获取数据
            //data表示把对象转换成json进行传递到接口里面

        });
    },




    updateSectorByIds(ids, state) {
        return request({
            url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/updateSectorByIds/${state}`,
            // url: `/hr/sector/updateSectorByIds/${state}`,
            method: 'post',
            data: ids,
            //roleQuery条件对象，后端使用requestbody获取数据
            //data表示把对象转换成json进行传递到接口里面

        });
    },


    //删除delSectorById
    delSectorByIds(ids) {
        return request({
             url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/delSectorByIds`,
            //url: `/hr/sector/delSectorByIds`,
            method: 'post',
            data: ids
        });
    },

    //修改
    updateSector(sector, id, sort) {
        return request({
              url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/updateSector?sector=${sector}&id=${id}&sort=${sort}`,
            //url: `/hr/sector/updateSector?sector=${sector}&id=${id}&sort=${sort}`,
            method: 'post',
            //roleQuery条件对象，后端使用requestbody获取数据
            //data表示把对象转换成json进行传递到接口里面

        });
    },




    //获取全部
    getAll() {
        return request({
              url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/sectories`,
            //url: `/hr/sector/sectories`,
            method: 'get'
        });
    },



    getSeclist() {
        return request({
            url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/list`,
            //url: `/hr/sector/list`,
            method: 'get'
        });
    },

    getOne(){
        return request({
              url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/getOneSec`,
            //url: `/hr/sector/getOneSec`,
            method: 'get'
        })
    },
    getBranInfo(parentId){
        return request({
             url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/getBranInfo/${parentId}`,
            // url: `/hr/sector/getBranInfo/${parentId}`,
            method: 'get'
        })
    },
    getBranSonInfo(parentId){
        return request({
              url: `/service-hr-0.0.1-SNAPSHOT/hr/sector/getBranSonInfo/${parentId}`,
            //url: `/hr/sector/getBranSonInfo/${parentId}`,
            method: 'get'
        })
    }
}
